﻿<%@ Page Title="家乐福——评选宝宝" Language="C#" MasterPageFile="~/MasterPageTwoCol.master"
    AutoEventWireup="true" CodeBehind="BabyList.aspx.cs" Inherits="WebSite.BabyList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .orderarea { display: inline-block; background: url(images/babylist/buttonarea.png) no-repeat; width: 380px; height: 30px; }
        .orderarea ul li { float: left; height: 29px; }
        .orderarea ul a { line-height: 29px; height: 29px; text-decoration: none; padding: 0px 55px; }
        
        .orderarea ul li.cur { background: url(images/babylist/buttonarea_selected.png) no-repeat; }
        
        div.photolist div.photoitem { display: inline-block; width: 330px; min-height: 50px; text-align: center; margin-bottom: 20px; /*margin-right: 2px;*/ margin-right: 5px; float: left; }
        
        div.photolist div.photoitem div.textpart { height: 50px; vertical-align: middle; }
        div.photolist div.photoitem div.textpart .part1 { display: inline-block; width: 130px; text-align: center; float: left; }
        
        div.photolist div.photoitem div.textpart .part2 { display: inline-block; width: 80px; text-align: center; float: left; }
        
        div.photolist div.photoitem div.textpart .part3 { display: inline-block; width: 120px; text-align: left; float: right; }
        
        div.photolist div.photoitem div.textpart .part3 .votetitle { display: inline-block; float: left; width: 40px; }
        
        div.photolist div.photoitem div.textpart .part3 .voteresult { display: inline-block; font-size: 26px; }
        
        div.photolist div.photoitem div.buttonpart .p1 { display: inline-block; float: left; }
        div.photolist div.photoitem div.buttonpart .p2 { display: inline-block; float: left; margin-left:10px; }
        div.photolist div.photoitem div.buttonpart .p3 { display: inline-block; float: left; margin-left:10px; line-height:30px; }
        
        div.photolist div.photoitem .sinaicon { vertical-align: top; display: inline-block; background: url(images/sina_icon.png) no-repeat; text-indent: 2em; }
    </style>
    <script src="js/baby.js" type="text/javascript"></script>
    <script type="text/javascript">
        function querybaby() {
            window.location = "/BabyList.aspx?query=" + $('.SearchTextBox').val();
        }

        function onenterkey() {
            if (event.keyCode == 13) {
                querybaby();
                return false;
            }
            else {
                return true;
            }
        }

        function sharehuaxu(picurl) {
            openwindowshare("#快乐宝宝帮#大赛精彩不断，还有多重好礼可以拿！猛戳>>>http://cover.carrefour.com.cn ", "http://cover.carrefour.com.cn/", picurl);
        }

        $(function () {
            $(".colorboxvideo").colorbox({ iframe: true, innerWidth: 610, innerHeight: 498 });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="InfoRow">
        <div style="float: left; display: inline-block; width: 40px; padding: 5px;">
            搜索</div>
        <div style="float: left; display: inline-block;">
            <input type="text" style="width: 500px" class="SearchTextBox" value="<%=  Request["query"] %>"
                onkeydown="return onenterkey(); " /></div>
        <div style="float: right; display: inline-block">
            <a href="javascript:void(0)" onclick="querybaby();">
                <div class="TextButton" style="width: 77px; background-image: url(images/babylist/button1.png)">
                    搜索
                </div>
            </a>
        </div>
        <div class="clearfloat">
        </div>
    </div>
    <div class="InfoRow" style="display:none">
        <div style="float: left; width: 40px; padding: 5px; display: inline-block">
            排序</div>
        <div style="float: left; display: inline-block;">
            <div class="orderarea">
                <ul>
                    <li class="<%= Request["ordertype"] != "2" ? "cur" : "" %>"><a class="ft_14 brown"
                        href="/BabyList.aspx?ordertype=1&query=<%= Request["query"] %>">按默认时间</a></li>
                    <li class="<%= Request["ordertype"] == "2" ? "cur" : "" %>"><a class="ft_14 brown"
                        href="/BabyList.aspx?ordertype=2&query=<%= Request["query"] %>">按网友投票</a></li>
                </ul>
            </div>
        </div>
        <div class="clearfloat">
        </div>
    </div>
    <div class="photolist">
        <% 
            if (TeamListData != null)
            {
                foreach (var item in TeamListData)
                {
                    int teamtype = Common.NullableHelper.CastValueType(item.Type);
                    string[] scores = (item.Ip ?? ",").Split(new char[] { ',' }, 2);
        %>
        <div class="photoitem">
            <div>
                <a href="/ViewBabyGroup1112.aspx?teamid=<%= item.Id %>">
                    <img class="imgteam_medium" src="<%= item.TeamHeadImg %>" alt="team photo" /></a>
            </div>
            <div class="textpart" style="padding-top: 10px;">
                <div class="part1">
                    <p class="yahei green2">
                        <%=item.TeamName%></p>
                    <p class="yahei orange2">
                        <%=item.BabyAName %>
                        /
                        <%=item.BabyBName%></p>
                </div>
                <div class="part2">
                    <p class="ft_14 orange2" style="display:none">
                        晋级赛总分</p>
                    <p class="ft_14 orange2" style="display:none">
                        <%= scores.Length > 1 ? scores[1] : "0" %></p>
                </div>
                <div class="part3">
                    <div class="yahei green2 ft_14 votetitle">
                        决赛票数</div>
                    <div id="piaoshu_<%=item.Id %>" class="orange2 yahei voteresult">
                        <%= item.TeamVoteNum %></div>
                </div>
                <div class="clearfloat">
                </div>
            </div>
            <div class="buttonpart">
                <div class="p1">
                    <%--<a class="colorboxvideo" href="http://player.youku.com/player.php/Type/Folder/Fid/18529227/Ob/1/sid/XNDcxNDc4NzM2/v.swf">--%>
                    
                    <a class="colorboxvideo" href="<%=item.VideoUrl %>">
                        <img src="images/BabyList/viewvideo.png" /></a>
                </div>
                <div class="p2">
                    &nbsp;
                    <!--<a href="javascript:void(0)" onclick="voteTeam(<%=item.Id%>,$('#piaoshu_<%=item.Id %>'))">
                        <img src="images/BabyList/geiwomentoupiao.png" /></a>-->
                </div>
                <div class="p3" >
                    <a href="javascript:void(0);" onclick="sharehuaxu('<%= item.TeamHeadImg %>');">
                        <img src="images/sina_icon.png" />分享到微博</div>
                    </a>
                    
                <div class="clearfloat">
                </div>
            </div>
        </div>
        <%
                }
            }
        %>
        <div class="clearfloat">
        </div>
    </div>
    <div class="pager" style="text-align: center;">
        <%
            System.Collections.Generic.Dictionary<string, string> pp = new System.Collections.Generic.Dictionary<string, string>();
            //pp.Add("areaid", areaId);
            //pp.Add("groupId", groupId);
            //pp.Add("race", race);
            //pp.Add("rolename", roleName);   
            pp.Add("ordertype", Request["ordertype"]);
            pp.Add("query", Request["query"]);
        %>
        <%=Shanda.Utility.Common.PaginationHelper.DoPagination(PageIndex, PageSize, RowTotal, Request.ApplicationPath.TrimEnd('/') + "/BabyList.aspx", pp, false)%>
        <div class="clearfloat">
        </div>
    </div>
    <div style="margin-bottom: 20px;">
    </div>
</asp:Content>
